{include file="common:meta" /}

    <title>意见反馈 - TXCMS_V2</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
</head>
<body>
{include file="common:header" /}

{include file="common:menu" /}
<section class="Hui-article-box">
    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> <a href="{:url('index/index')}">首页</a> <span class="c-gray en">&gt;</span> 评论管理 <span class="c-gray en">&gt;</span> 意见反馈 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
    <div class="Hui-article">
        <div class="cl pd-5 bg-1 bk-gray mt-20">
            <span class="l">
                <a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除
                </a>
            </span>
        </div>
        <article class="cl pd-20">
            <div class="mt-20">
                <div class="table-responsive">
                <table class="table table-border table-bordered table-hover table-bg table-sort">
                    <thead>
                    <tr class="text-c">
                        <th width="25"><input type="checkbox" name="" value=""></th>
                        <th width="10">ID</th>
                        <th width="60">用户名</th>
                        <th width="50">反馈内容</th>
                        <th width="50">时间</th>
                        <th width="50">状态</th>
                        <th width="20">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {volist name="data" id="vo"}
                    <tr class="text-c">
                        <td><input type="checkbox"  value="{$vo.id}" name="checkdel"></td>
                        <td>{$vo.id}</td>
                        <td>{$vo.user.nickname}</td>
                        <td class="text-l">{$vo.content}</td>
                        <td>{$vo.create_time}</td>
                        <td>
                            {if condition="$vo.status eq 0"}<span class="label label-warning radius">未读</span>
                            {else /}<span class="label label-success radius">已读</span>
                            {/if}
                        </td>
                        <td class="td-manage">
                            <!--<a title="编辑" href="javascript:;" onclick="member_edit('编辑','member-add.html','4','','510')" style="text-decoration:none"><i class="Hui-iconfont">&#xe6df;</i></a>-->
                            <a title="删除" href="javascript:;" onclick="member_del({$vo.id})" class="btn btn-warning-outline radius size-MINI" style="text-decoration:none">删除</a></td>
                    </tr>
                    {/volist}
                    </tbody>
                </table>
                </div>
                <div style="float: right;">{$page}</div>
            </div>

        </article>

    </div>
</section>

{include file="common:footer" /}

<!--请在下方写此页面业务相关的脚本-->
{load href="__STATIC__/admin/lib/My97DatePicker/4.8/WdatePicker.js"}
{load href="__STATIC__/admin/lib/datatables/1.10.0/jquery.dataTables.min.js"}
{load href="__STATIC__/admin/lib/laypage/1.2/laypage.js"}
<script type="text/javascript">
    /*用户-删除*/
    function member_del(id){
        $.post('/admin.php/admin/suggest/del',{'id':id},function (res) {
            if(res.code===0){
                layer.msg(res.msg,{icon:2});
            }else{
                layer.msg(res.msg,{icon:1});
                setTimeout(function () {window.location.reload()},2000)
            }
        })
    }

    /*批量删除*/
    function datadel(){
        var ids = [];
        $("input:checkbox[name='checkdel']:checked").each(function(i) { // 遍历name=test的多选框
                ids[i] = $(this).val();// 每一个被选中项的值
        });
        $.post('/admin.php/admin/suggest/checkboxdel',{ids:ids},function(res){
            if(res.code===1){
                layer.msg('批量删除成功');
                setTimeout(function () {window.location.reload()},2000)
            }else{
                layer.msg('批量删除失败');
            }
        },'json')
    }

</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>